/*
 *BFS模版举例，倒酒问题
 * 节约篇幅，只打印1种操作！
 *
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;
int A, B, C;
bool vis[101][101];
struct State
{
	int V1, V2;
	int Step;
	int op;//上一次的操作
	int pre;//上一个状态的位置
};
State a[10001];
int ans[10001];
queue<State> q;
int l, r;
bool ok;
void print(State now)
{
	printf("%d\n", now.Step);
	int cnt = 0;
	for (; now.pre != 0; now = a[now.pre])
	{
		cnt++;
		ans[cnt] = now.op;
	}
	for (int i = cnt; i >= 1; i--)
	{
		switch (ans[i])
		{
		case 1:
			puts("FILL(1)");
			break;
		case 2:
			puts("FILL(2)");
			break;
		case 3:
			puts("DROP(1)");
			break;
		case 4:
			puts("DROP(2)");
			break;
		case 5:
			puts("POUR(1,2)");
			break;
		case 6:
			puts("POUR(2,1)");
			break;
		}
	}
}
void fill(int i, State& next)
{
	next.Step++;
	next.pre = l;
	if (i == 1)
	{
		next.V1 = A;
		next.op = 1;
	}
	else
	{
		next.V2 = B;
		next.op = 2;
	}
}

void drop(int i, State& next)
{
	next.Step++;
	next.pre = l;
	if (i == 1)
	{
		next.V1 = 0;
		next.op = 3;
	}
	else
	{
		next.V2 = 0;
		next.op = 4;
	}
}

void pour(int i, State& next)
{
	next.Step++;
	next.pre = l;
	if (i == 1)
	{
		if (next.V2 + next.V1 > B)
		{
			next.V1 = next.V1 - (B - next.V2);
			next.V2 = B;
		}
		else
		{
			next.V2 = next.V2 + next.V1;
			next.V1 = 0;
		}
		next.op = 5;
	}
	else
	{
		if (next.V2 + next.V1 > A)
		{
			next.V2 = next.V2 - (A - next.V1);
			next.V1 = A;
		}
		else
		{
			next.V1 = next.V2 + next.V1;
			next.V2 = 0;
		}
		next.op = 6;
	}
}
bool Check(State next)
{
	if (!vis[next.V1][next.V2])
		return true;
	return false;
}

void bfs()
{
	ok = false;
	memset(vis, 0, sizeof(vis));
	State now, next, st;
	st.V1 = st.V2 = st.op = st.Step = st.pre = 0;
	q.push(st);
	vis[0][0] = 1;
	l = 0;
	r = 1;
	a[1] = st;
	while (!q.empty())//while(l<r)
	{
		l++;
		now = q.front();
		if (now.V1 == C || now.V2 == C)
		{
			print(now);
			ok = true;
			return;
		}
		next = now;
		fill(1, next);
		if (Check(next))
		{
			q.push(next);
			r++;
			a[r] = next;
			vis[next.V1][next.V2] = 1;
		}
		next = now;
		fill(2, next);
		if (Check(next))
		{
			q.push(next);
			r++;
			a[r] = next;
			vis[next.V1][next.V2] = 1;
		}
		next = now;
		drop(1, next);
		if (Check(next))
		{
			q.push(next);
			r++;
			a[r] = next;
			vis[next.V1][next.V2] = 1;
		}
		next = now;
		drop(2, next);
		if (Check(next))
		{
			q.push(next);
			r++;
			a[r] = next;
			vis[next.V1][next.V2] = 1;
		}
		next = now;
		pour(1, next);//1->2
		if (Check(next))
		{
			q.push(next);
			r++;
			a[r] = next;
			vis[next.V1][next.V2] = 1;
		}
		next = now;
		pour(2, next);//2->1
		if (Check(next))
		{
			q.push(next);
			r++;
			a[r] = next;
			vis[next.V1][next.V2] = 1;
		}
		q.pop();
	}
}
int main()
{
	scanf("%d%d%d", &A, &B, &C);
	bfs();
	if(!ok)
		puts("impossible");
	return 0;
}
